package com.future.hair.server.util;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;


@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new RequestInterceptor()).addPathPatterns("/hair/**").
                excludePathPatterns("/hair/config/**",
                        "/hair/login/index",
                        "/hair/user/create",
                        "/hair/works/list",
                        "/hair/works/id",
                        "/hair/category/list",
                        "/hair/reserveCategory/list",
                        "/hair/home/**",
                        "/hair/categoryVo/**",
                        "/hair/worksVo/**",
                        "/hair/commentVo/**",
                        "/hair/appraiseVo/**",
                        "/swagger-ui.html#/"
                );
    }
}
